<template>
	<div class="item" @click="go">
		<div>
			<span class="label">任务单号:</span>
			<span class="value">{{value.code}}</span>

			<span class="status">未入库</span>
		</div>
		<div>
			<span class="label">任务名称:</span>
			<span class="value">{{value.name}}</span>
		</div>
		<div>
			<span class="label">盘点仓库:</span>
			<span class="value">{{value.store}}</span>
		</div>
		<div>
			<span class="label">盘点类型:</span>
			<span class="value">{{value.type}}</span>
		</div>
		<div>
			<span class="label">任务下达时间:</span>
			<span class="value">{{value.taskDate}}</span>
		</div>
		<img src="../../../static/images/arrow-right.png" class="arr" />
	</div>
</template>

<script setup>
	import {useRouter} from 'vue-router'
	const router=useRouter();
	//声明属性
	const props = defineProps({
		value: {
			type: Object,
			required: false,
			default: () => {
				return {
					id: 0,
					code: "",
					name: "",
					store: "",
					type: "",
					taskDate: ""
				}
			}

		}
	});
	
	function go(){
		router.push("/tasklist");
	}
</script>

<style scoped>
	.status {
		float: right;
		color: #666;
	}

	.item {
		width: 7.5rem;
		height: 2.8rem;
		background-color: #fff;
		margin: 0.2rem auto;
		border-radius: 0.15rem;
		font-size: 0.3rem;
		color: #333;
		padding-top: 0.2rem;
	}

	.item div {
		height: 0.5rem;
		line-height: 0.5rem;
		margin: 0 0.2rem;
	}

	.label {
		color: #666;
	}

	.value {
		margin-left: 0.1rem;
	}

	.arr {
		width: 0.5rem;
		height: 0.5rem;
		position: relative;
		left: 6.6rem;
		top: -1.2rem;
	}
</style>
